<!doctype html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>享送小哥</title>
    <link rel="stylesheet" type="text/css" href="../css/aui.css" />
    <link rel="stylesheet" type="text/css" href="../css/style.css" />
</head>

<body>
    <div class="aui-content">
        <header class="aui-bar aui-bar-nav aui-bar-light u-aui-bar" id="header">
            <a href="javascript:api.closeWin();" class="aui-pull-left aui-btn"> <span class="aui-iconfont aui-icon-left"></span> </a>
            <div class="aui-title u-aui-title">新增地址</div>
            <div class="aui-pull-right" onclick="save()">保存</div>
        </header>
    </div>
    <script type="text/javascript" src="../script/api.js"></script>
    <script type="text/javascript" src="../script/app.js"></script>
    <script type="text/javascript">
        apiready = function() {
            var statusBarPos = app.statusBar.pos();
            var headerPos = app.pos("header");

            api.openFrame({
                name: 'new_address_content',
                url: 'new_address_content.html',
                rect: {
                    x: 0,
                    y: statusBarPos.h + headerPos.h,
                    w: 'auto',
                    h: 'auto'
                },
                bounces: true,
                pageParam: {
                    address: api.pageParam.address
                }
            });
        }

        function save() {
            api.execScript({
                frameName: 'new_address_content',
                script: 'vObj.save()'
            });
        }
    </script>
</body>

</html>
